import config from "@/config"
import http from "@/utils/request"

export default {
    // 任务列表
    task:{
        list: {
			url: `${config.API_URL}/adminapi/task.Task/lists`,
			name: "获取任务列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/task.Task/add`,
			name: "添加任务",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/task.Task/edit`,
			name: "修改任务",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/task.Task/delete`,
			name: "删除任务",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/task.Task/detail`,
			name: "任务详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        useDetail: {
			url: `${config.API_URL}/adminapi/task.Task/taskUser`,
			name: "任务打卡人员",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        check: {
			url: `${config.API_URL}/adminapi/task.Task/updStatus`,
			name: "审核",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
    },
    // 用户管理
    use:{
        list: {
			url: `${config.API_URL}/adminapi/task.User/lists`,
			name: "获取用户管理列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/task.User/add`,
			name: "添加用户管理",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/task.User/edit`,
			name: "修改用户管理",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/task.User/delete`,
			name: "删除用户管理",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/task.User/detail`,
			name: "用户管理详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
    },
    // 打卡记录
    record:{
        list: {
			url: `${config.API_URL}/adminapi/task.PunchLog/lists`,
			name: "获取打卡记录列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/task.PunchLog/add`,
			name: "添加打卡记录",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/task.PunchLog/edit`,
			name: "修改打卡记录",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/task.PunchLog/delete`,
			name: "删除打卡记录",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/task.PunchLog/detail`,
			name: "打卡记录详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
    },
}